package com.ldy.question;

/**
 * <br>
 * 版权: Copyright (c) 2011-2018<br>
 * 公司: 活力天汇<br>
 *
 * @author: 刘德咏<br>
 * @date: 2018-04-19<br>
 */
public class TestStringBuffer {

    public static void main(String[] args) {
        StringBuffer s1 = new StringBuffer("good");
        StringBuffer s2 = new StringBuffer("bad");
        test(s1, s2);
        System.out.println(s1);
        System.out.println(s2);
    }

    public static void test(StringBuffer s1, StringBuffer s2) {
        s2 = s1;
        s1 = new StringBuffer("new");
        s1.append("world");
        s2.append("world");
    }

}
